home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 318 < prev    next >
Internet Message Format  |  1996-08-06  |  2KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c,comp.std.c
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Date: Wed, 07 Feb 96 13:17:25 GMT
  6. Organization: none
  7. Message-ID: <823699045snz@genesis.demon.co.uk>
  8. References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM> <KANZE.96Feb5133404@slsvewt.lts.sel.alcatel.de>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <KANZE.96Feb5133404@slsvewt.lts.sel.alcatel.de>
  15.            kanze@lts.sel.alcatel.de "James Kanze US/ESC 60/3/141 #40763" writes:
  16.  
  17. >I do see a difference in using an `asm' extension (with the meaning as
  18. >in classical C) and dereferencing a null pointer, in that the first is
  19. >not undefined behavior; it requires a diagnostic, so presumably,
  20. >anyone porting my code will stumble across it, and realize that they
  21. >have a portability problem.
  22. >
  23. >But this only works because `asm' is *not* undefined behavior.
  24.  
  25. I'm not quite clear on the intention of the standard here. As a
  26. categorisation of types of error it is useful to distinguish between
  27. errors that require a diagnostic and plain undefined behaviour. However
  28. when a diagnostic is required clearly the result is undefined behaviour.
  29.  
  30. 3.16 Undefined behaviour
  31.  
  32. "Behaviour, upon use of a nonportable or erroneous program construct"
  33.  
  34. "... or by the omission of any explicit definition of behaviour"
  35.  
  36. These would seem to cover syntax errors and constraint violations.
  37.  
  38. -- 
  39. -----------------------------------------
  40. Lawrence Kirby | fred@genesis.demon.co.uk
  41. Wilts, England | 70734.126@compuserve.com
  42. -----------------------------------------
  43.